<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS3波纹特效</title>
    <style>
      .box {
        width: 300px;
        margin: 100px auto;
        position: relative;
        overflow: hidden;
      }

      .box img {
        display: block;
        width: 100%;
      }

      .box::before {
        content: "";
        position: absolute;
        top: 0;
        left: -165px;
        width: 100px;
        height: 100%;
        transform: skewX(-30deg);
        background-image: linear-gradient(
          270deg,
          hsla(0, 0%, 100%, 0),
          hsla(0, 0%, 100%, 0.5) 50%,
          hsla(0, 0%, 100%, 0)
        );
      }
      .box:hover::before {
        left: 370px;
        transition: all 0.3s ease-in;
      }
    </style>
  </head>

  <body>
    <div class="box">
      <img src="https://qiniu.zhangkai2019.cn/image/dance.gif" alt="" />
    </div>
  </body>
</html>
